#ifndef JSONBASE_H
#define JSONBASE_H
#ifndef BOOL
typedef enum
{
    FALSE = 0,
    TRUE = 1
} BOOL;
#endif
#include "rapidjson/rapidjson.h"
#include "rapidjson/document.h"
#include "rapidjson/stringbuffer.h"
#include "rapidjson/writer.h"
using namespace std;
namespace Json
{
    class JsonBase
    {
    public:
        JsonBase();
    };
    int GetDocumentData(rapidjson::Document &doc,std::string value1,std::string value2,std::string &returnValue);
    int GetDocumentData(rapidjson::Document &doc, std::string value1, std::string value2, std::string value3, std::string &returnValue);
    int GetDocumentData(rapidjson::Document &doc, std::string value1, std::string value2, int &returnValue);
    int GetDocumentData(rapidjson::Document &doc, std::string value1, std::string value2, std::string value3,int &returnValue );
    int GetDocumentArray(rapidjson::Document &doc,std::string value1,std::string value2,rapidjson::Value& array);
    int GetDocumentArray(rapidjson::Document &doc, std::string value1, std::string value2, std::string value3,rapidjson::Value& array);
    int GetDocumentArrayItem(rapidjson::Value& array,std::string value1,int iIndex,std::string &returnValue);
    int GetDocumentArrayItem(rapidjson::Value& array,std::string value1,int iIndex,int &returnValue);
    int GetDocumentArrayItem(rapidjson::Value& array,std::string value1,int iIndex,int &returnValue,bool bflag);
    double GetDocumentArrayItem(rapidjson::Value& array,std::string value1,int iIndex,double &returnValue);
    char *changeJsonKeyToLowerCase(char *json, int iLen, const BOOL mallocFlag = FALSE);
}
#endif // JSONBASE_H
